Optimal. Leaf size=60 \[ -\frac {b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{3/2} d}+\frac {\tanh (c+d x)}{(a-b) d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3270, 396, 214}
\begin {gather*} \frac {\tanh (c+d x)}{d (a-b)}-\frac {b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} d (a-b)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 396
Rule 3270
Rubi steps
\begin {align*} \int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {1-x^2}{a-(a-b) x^2} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\tanh (c+d x)}{(a-b) d}-\frac {b \text {Subst}\left (\int \frac {1}{a+(-a+b) x^2} \, dx,x,\tanh (c+d x)\right )}{(a-b) d}\\ &=-\frac {b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{3/2} d}+\frac {\tanh (c+d x)}{(a-b) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 60, normalized size = 1.00 \begin {gather*} -\frac {b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{3/2} d}+\frac {\tanh (c+d x)}{(a-b) d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(218\) vs.
\(2(52)=104\).
time = 1.52, size = 219, normalized size = 3.65
method | result | size |
risch | \(-\frac {2}{d \left (a -b \right ) \left (1+{\mathrm e}^{2 d x +2 c}\right )}+\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}+2 a^{2}-2 a b}{b \sqrt {a^{2}-a b}}\right )}{2 \sqrt {a^{2}-a b}\, \left (a -b \right ) d}-\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}-2 a^{2}+2 a b}{b \sqrt {a^{2}-a b}}\right )}{2 \sqrt {a^{2}-a b}\, \left (a -b \right ) d}\) | \(195\) |
derivativedivides | \(\frac {\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a -b \right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {2 b a \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{a -b}}{d}\) | \(219\) |
default | \(\frac {\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a -b \right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {2 b a \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{a -b}}{d}\) | \(219\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 226 vs.
\(2 (52) = 104\).
time = 0.41, size = 709, normalized size = 11.82 \begin {gather*} \left [-\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + b\right )} \sqrt {a^{2} - a b} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + 8 \, a^{2} - 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - 4 \, {\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {a^{2} - a b}}{b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + {\left (2 \, a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}\right ) + 4 \, a^{2} - 4 \, a b}{2 \, {\left ({\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \sinh \left (d x + c\right )^{2} + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d\right )}}, \frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + b\right )} \sqrt {-a^{2} + a b} \arctan \left (-\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {-a^{2} + a b}}{2 \, {\left (a^{2} - a b\right )}}\right ) - 2 \, a^{2} + 2 \, a b}{{\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \sinh \left (d x + c\right )^{2} + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {sech}^{2}{\left (c + d x \right )}}{a + b \sinh ^{2}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.64, size = 80, normalized size = 1.33 \begin {gather*} -\frac {\frac {b \arctan \left (\frac {b e^{\left (2 \, d x + 2 \, c\right )} + 2 \, a - b}{2 \, \sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} {\left (a - b\right )}} + \frac {2}{{\left (a - b\right )} {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.47, size = 265, normalized size = 4.42 \begin {gather*} \frac {b\,\ln \left (\frac {4\,\left (2\,a\,b-b^2+8\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-8\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{a\,{\left (a-b\right )}^3}-\frac {8\,b+32\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}-16\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}}{\sqrt {a}\,{\left (a-b\right )}^{5/2}}\right )}{2\,\sqrt {a}\,d\,{\left (a-b\right )}^{3/2}}-\frac {b\,\ln \left (\frac {8\,b+32\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}-16\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}}{\sqrt {a}\,{\left (a-b\right )}^{5/2}}+\frac {4\,\left (2\,a\,b-b^2+8\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-8\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{a\,{\left (a-b\right )}^3}\right )}{2\,\sqrt {a}\,d\,{\left (a-b\right )}^{3/2}}-\frac {2}{\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )\,\left (a\,d-b\,d\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________